{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import tensorflow as tf\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#生成200个随机点，200行，1列的数据\n",
    "x_data =np.linspace(-0.5,0.5,200)[:,np.newaxis]\n",
    "noise = np.random.normal(0,0.02,x_data.shape) #生成噪音\n",
    "y_data = np.square(x_data) + noise #生成一个不太标准的U型\n",
    "\n",
    "x = tf.placeholder(tf.float32,[None,1])\n",
    "y = tf.placeholder(tf.float32,[None,1])\n",
    "\n",
    "#构建神经网络中间层，使输入x最后尽量符合实际y值\n",
    "Weights_L1 = tf.Variable(tf.random.normal[1,10])\n",
    "biases_L1 = tf.Variable(tf.zeros[1,10])\n",
    "Wx_plus_b_L1 = tf.matmul(x,Weights_L1) + biases_L1\n",
    "L1 = tf.nn.tanh(Wx_plus_b_L1)\n",
    "\n",
    "\n"
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python [default]",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
